package com.cc.service;

import com.cc.entity.User;
import com.cc.mapper.userMapper;

import org.apache.ibatis.annotations.Param;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class IEbuserService implements IEbusersService {
    @Autowired
    private userMapper usermapper;
    @Override
    public List<User> findByPage( Integer page, Integer pageSize){
Integer form= (page-1)*pageSize;
    return usermapper.findByPage(form,pageSize);
    }
    @Override
    public int  delete(String id){
        return usermapper.delete(id);
    }
    @Override
    public  int  save(User user){
return usermapper.save(user);
    }
    @Override
    public int update(User user){
        return usermapper.update(user);
    }
    @Override
    public User selectByid(String id){
        return usermapper.selectByid(id);
    }
    @Override
    public int total(){
        return usermapper.total();
    }

@Override
    public User login(String id,String password){ return usermapper.login( id,password); }

}
